import axios from "./index"
// 添加购物车
export function addCar(userid:string,proid:string,num:string){
    return axios.post("/cart/add",{userid,proid,num})
}
// 推荐
export function recommend(count:number,limitNum:number){
    return axios.get("/pro/recommendlist",{params:{count,limitNum}})
}
// 查看购物车
export function lookCar(userid:string){
    return axios.post("/cart/list",{userid})
}
export function dele(cartid:string){
    return axios.post("/cart/remove",{cartid})
}
// 更新当前购物车选中状态
export function selectO(cartid:string,flag:boolean){
    return axios.post("/cart/selectone",{cartid,flag})
}
// 更新所有购物车选中状态
export function selectA(userid:string,type:any){
    return axios.post("/cart/selectall",{userid,type})
}
// 更新购物车数量
export function update(cartid:string,num:any){
    return axios.post("cart/updatenum",{cartid,num})
}